﻿using System.Data;
using System.Collections.Generic;
using CrazyTalk.Models;

namespace CrazyTalk.IDAL
{
	/// <summary>
	/// 接口层MenuBLL
	/// </summary>
	public interface IMenuDAL
	{
        /// <summary>
        /// 获取所有的Id
        /// </summary>
        /// <param name="fields"></param>
        /// <param name="values"></param>
        /// <returns></returns>
        List<int> GetAllId(List<string> fields, List<object> values);
		/// <summary>
		/// 是否存在该记录
		/// </summary>
        bool Exists(string MenuID);
        /// <summary>
        /// 是否存在该记录
        /// </summary>
        bool Exists(List<string> fields,List<object> values);
		/// <summary>
		/// 增加一条数据
		/// </summary>
		bool Add(Menu model);
		/// <summary>
		/// 更新一条数据
		/// </summary>
		bool Update(Menu model);
        bool Update(List<string> fields, List<object> values);
		/// <summary>
		/// 删除一条数据
		/// </summary>
		bool Delete(string MenuID);
		bool DeleteList(string MenuIDlist );
		/// <summary>
		/// 得到一个对象实体
		/// </summary>
		Menu GetModel(string MenuID);
		/// <summary>
		/// 获得数据列表
		/// </summary>
        DataSet GetList(List<string> fields, List<object> values);
        /// <summary>
        /// 绕过报表权限控制，提取所有报表页面
        /// </summary>
        /// <param name="list">需要获取的报表的MenuID</param>
        /// <returns></returns>
        DataSet GetReportsList(List<string> list);
        /// <summary>
        /// 获得数据列表
        /// </summary>
        DataSet GetListPermission(List<string> fields, List<object> values);
        /// <summary>
        /// 获得数据列表(拥有网吧连锁公司父级的获取菜单方式)
        /// </summary>
        DataSet GetListPermission2(List<string> fields, List<object> values, string parentId);
        /// <summary>
        /// 获得数据列表
        /// </summary>
        DataSet GetListUnionPermissionList(List<string> fields, List<object> values);
        /// <summary>
        /// 获取隐藏菜单的权限控制列表
        /// </summary>
        /// <param name="roleId">限定的角色编号</param>
        /// <returns></returns>
        DataTable GetHiddenMenuList(int roleId);
        /// <summary>
        /// 获得数据列表
        /// </summary>
        DataSet GetListUnionMenu(List<string> fields, List<object> values);
		/// <summary>
		/// 获得前几行数据
		/// </summary>
		DataSet GetList(int Top,List<string> fields, List<object> values,string filedOrder);
		int GetRecordCount(List<string> fields, List<object> values);
		DataSet GetListByPage(List<string> fields, List<object> values, string orderby, int startIndex, int endIndex);
		/// <summary>
        /// 根据输入的用户名和角色编号，获取用户的显示菜单列表
        /// </summary>
        /// <param name="userId">用户名</param>
        /// <param name="roleId">角色编号</param>
        /// <returns></returns>
        DataTable GetMenuList(string userId, int roleId);
        
        
	} 
}
